package com.ruoyi.interview.domain;

import com.ruoyi.common.core.web.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Objects;


public class Account extends BaseEntity {
//    主键
    private Long accId;
//    姓名
    private String accName;
//    账户余额
    private BigDecimal accBalance;


    public Account() {
    }

    public Account(Long accId, String accName, BigDecimal accBalance) {
        this.accId = accId;
        this.accName = accName;
        this.accBalance = accBalance;
    }

    public Long getAccId() {
        return accId;
    }

    public void setAccId(Long accId) {
        this.accId = accId;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public BigDecimal getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(BigDecimal accBalance) {
        this.accBalance = accBalance;
    }

    @Override
    public String toString() {
        return "Account{" +
                "accId=" + accId +
                ", accName='" + accName + '\'' +
                ", accBalance=" + accBalance +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Account account = (Account) o;
        return Objects.equals(accId, account.accId) &&
                Objects.equals(accName, account.accName) &&
                Objects.equals(accBalance, account.accBalance);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accId, accName, accBalance);
    }
}
